<template>
	<div class="layui-unselect layui-form-checkbox" :class="isChecked  ? 'layui-form-checked' : ''" lay-skin="primary" @tap="check">
		<span>{{title}}</span>
		<i class="layui-icon layui-icon-ok"></i>
	</div>
</template>

<script>
	export default {
		name : "checkboxGroup" ,
		props:{
			title : { 
				type : String , 
				default : ""
			},
			name : {
				type : String , 
				default : ""
			},
			value : {
				type : String , 
				default : ""
			}
		},
		created : function(e){
			
		},
		data() {
			return {
				isChecked : false
			};
		},
		methods:{
			check:function(res){
				this.isChecked = !this.isChecked ;
				this.$emit("change", this.isChecked);
			},
		}
	}
</script>

<style>

</style>
